package com.exce2;

/**
 * @Author WaveHi
 * @Date 6/8/2021 上午 10:55
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description 狗狗
 */
public class Dog extends PetD implements Pet{

    public Dog() {

        System.out.println("I am the constructor of no parameter.");

    }

    public Dog(String name,int age) {

        this();
        this.setName(name);
        this.setAge(age);

    }

    /**
     * 打招呼
     */
    public void sayHi() {

        System.out.println("Hello!,I am" + this.getName());

    }
}
